import React, {Component,Fragment} from 'react';
import { Link } from 'react-router-dom';
import './GoodsShow.css'
export default class GoodsItem extends Component{
    render(){
        return(
            <Fragment>
                <div className='goods-item'>
                    <div className='goods-pic'>
                        <Link to={`/details/${this.props.id}`}><img src={this.props.pic} alt=''/></Link>
                    </div>
                    <p className='goods-title'>{this.props.title}</p>
                    <span className='goods-discount'>{this.props.discount}</span>
                    <span className='goods-price'>￥{this.props.price}<span className='goods-size px9'>/{this.props.size}</span></span>
                </div>
            </Fragment>
        )
    }
}